package dk.ihk.ssgroup5.dto;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class Database {
	
	private String driver = "com.mysql.jdbc.Driver";
	private String url = "jdbc:mysql://127.0.0.1/summerschool";
	private String uid = "summerschool";
	private String psw = "group5onIHK!";
	
	public Connection newCon(){
		
		Connection con = null;		
		
		try {
			Class.forName(driver);
			con = DriverManager.getConnection(url, uid, psw);
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		return con;
		
	}
}
